package com.grass.p019lv.service;

import android.app.IntentService;
import android.content.Intent;
import com.androidx.p013lv.base.bean.ClassifyBean;
import com.androidx.p013lv.base.bean.DefaultBean;
import com.androidx.p013lv.base.bean.UserAccount;
import com.androidx.p013lv.base.http.BaseRes;
import com.androidx.p013lv.base.http.HttpUtils;
import com.androidx.p013lv.base.http.UrlManager;
import com.androidx.p013lv.base.http.callback.HttpCallback;
import com.androidx.p013lv.base.utils.NetUtil;
import com.androidx.p013lv.base.utils.SpUtils;
import java.util.List;

/* renamed from: com.grass.lv.service.ClassifyService */
public class ClassifyService extends IntentService {
    String HTTP_TAG = "classifyListService";

    public ClassifyService() {
        super("classifyListService");
    }

    /* access modifiers changed from: protected */
    public void onHandleIntent(Intent intent) {
        if (NetUtil.isNetworkAvailable()) {
            HttpUtils.getInsatance().get(UrlManager.getInsatance().classifyList(), new HttpCallback<BaseRes<List<ClassifyBean>>>(this.HTTP_TAG) {
                /* class com.grass.p019lv.service.ClassifyService.C32211 */

                public void onLvSuccess(BaseRes<List<ClassifyBean>> baseRes) {
                    SpUtils.getInstance().setClassify(baseRes.getData());
                }
            });
            HttpUtils.getInsatance().get(UrlManager.getInsatance().userAccList(), new HttpCallback<BaseRes<UserAccount>>("userAccount") {
                /* class com.grass.p019lv.service.ClassifyService.C32222 */

                public void onLvSuccess(BaseRes<UserAccount> baseRes) {
                    if (baseRes.getCode() == 200) {
                        SpUtils.getInstance().setUserAccount(baseRes.getData());
                    }
                }
            });
            HttpUtils.getInsatance().get(UrlManager.getInsatance().startApp(), new HttpCallback<BaseRes<DefaultBean>>("startApp") {
                /* class com.grass.p019lv.service.ClassifyService.C32233 */

                public void onLvSuccess(BaseRes<DefaultBean> baseRes) {
                }
            });
        }
    }

    public void onDestroy() {
        super.onDestroy();
        HttpUtils.getInsatance().cancelTag(this.HTTP_TAG);
    }
}
